import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons'
import { Button, ButtonProps } from 'antd'

/**
 * 新增按钮
 */
export const AddButton = (props: ButtonProps) => (
  <Button type="primary" icon={<PlusOutlined />} {...props}>
    新增
  </Button>
)

/**
 * 删除按钮
 */
export const DeleteButton = (props: ButtonProps) => (
  <Button danger type="primary" icon={<DeleteOutlined />} {...props}>
    删除
  </Button>
)

/**
 * 删除图标
 */
export const DeleteIconButton = (props: ButtonProps) => (
  <Button danger type="text" color="danger" variant="filled" icon={<DeleteOutlined />} {...props} />
)

/**
 * 编辑按钮
 */
export const EditButton = (props: ButtonProps) => (
  <Button type="primary" icon={<EditOutlined />} {...props}>
    编辑
  </Button>
)

/**
 * 编辑图标
 */
export const EditIconButton = (props: ButtonProps) => (
  <Button danger type="text" color="primary" variant="filled" icon={<EditOutlined />} {...props} />
)

/**
 * 查询按钮
 */
export const SearchButton = (props: ButtonProps) => (
  <Button type="primary" {...props}>
    查询
  </Button>
)

/**
 * 重置按钮
 */
export const ResetButton = (props: ButtonProps) => (
  <Button {...props}>重置</Button>
)
